//
//  main.m
//  nsdataDemo
//
//  Created by zhouxiaobo on 15/10/26.
//  Copyright © 2015年 mapath. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSString *str = @"hello world";
        NSData *da = [str dataUsingEncoding:NSUTF8StringEncoding];
        NSLog(@"%@",da);
        
        NSString *str1 = [[NSString alloc]initWithData:da encoding:NSUTF8StringEncoding];
        NSLog(@"%@",str1);
        
    }
    return 0;
}
